package remoting

import model.response.{WXOrderQueryResponse, WXPayCloseResponse, WXPayRefundResponse, WXPayResponse, WXRefundQueryResponse, WXSignkeyResponse}
import okhttp3.RequestBody
import retrofit2.Call
import retrofit2.http.{Body, POST}

trait WXPayRemoting {

  /**
   * 统一下单
   *
   * @param body
   * @return
   */
  @POST("/pay/unifiedorder")
  def unifiedOrder(@Body body: RequestBody): Call[WXPayResponse]

  /**
   * 申请退款
   *
   * @param body
   * @return
   */
  @POST("/secapi/pay/refund")
  def refund(@Body body: RequestBody): Call[WXPayRefundResponse]

  /**
   * 订单查询
   *
   * @param body
   * @return
   */
  @POST("/pay/orderquery")
  def query(@Body body: RequestBody): Call[WXOrderQueryResponse]

  /**
   * 退款查询
   *
   * @param body
   * @return
   */
  @POST("/pay/refundquery")
  def refundQuery(@Body body: RequestBody): Call[WXRefundQueryResponse]

  /**
   * 交易关单
   *
   * @param body
   * @return
   */
  @POST("/pay/closeorder")
  def closeOrder(@Body body: RequestBody): Call[WXPayCloseResponse]

  /**
   * 沙箱环境获取签名key接口
   *
   * @param body
   * @return
   */
  @POST("/sandboxnew/pay/getsignkey")
  def getSignKey(@Body body: RequestBody): Call[WXSignkeyResponse]
}
